<!--  colors background text starts -->
<?php if ($page->is_datacard == 0){
	
	$bgColor = !empty($page->bg_color) ? $page->bg_color : '#55ae98';
?>


<div class="col-md-12 pb-50 pt-50 text-center banner">
	<div class="wrapper">
		<?php if (!empty($page->image)):?>
			<img src="<?php echo Yii::app()->getBaseUrl();?>/images/<?php echo $page->image;?>" />
		<?php endif;?>
		<h1 class="headings text-black"><?php echo ucwords(strip_tags(htmlspecialchars_decode($page->banner_heading)))?></h1>
		
		<div class="col-md-3"></div>
		
		<div class="col-md-6">
			<p class="text-black"><?php echo ucfirst(strip_tags(htmlspecialchars_decode($page->banner_small)))?></p>
			
			<div class="clearfix"></div>
			<?php if ($page->button_text != ''):?>
			<?php $href = !empty($page->button_link) ? $page->button_link : $this->createUrl('site/contact'); ?>
				<a href="<?php echo $href;?>" class="btn btn-danger mt-20"><?php echo $page->button_text?></a>
			<?php endif;?>
		</div>
		
		<div class="col-md-3"></div>
	</div>
</div>
<!--  colors background text Ends -->

	<div class="clearfix"></div>
<?php } else {?>
	<hr style="margin:0 0 1em;"/>
<?php } ?>

<!-- container with left & right sections start -->

<div class="wrapper">
<?php if ($page->is_datacard == 0){ ?>
	<div class="col-md-12 pt-20">
<?php
	$menuItems = Menuitems::model()->findBYAttributes(array('page_id'=>$page->id));
	if ( isset($menuItems->id) && !empty($menuItems->id) ){
		$this->widget('zii.widgets.CBreadcrumbs', array(
	    	'links'=>$this->breadcrumb($menuItems->id, $page->slug)
		));
	} else {
		$this->widget('zii.widgets.CBreadcrumbs', array(
			'links'=>array($page->slug),
		));
	}
 } else{ ?>
	
	<div class="col-md-12">
 <?php 
	 $this->widget('zii.widgets.CBreadcrumbs', array(
	 		'links'=>array('datacards'=>$this->createUrl('site/page',array('slug'=>'view-datacards')),strtolower(htmlspecialchars_decode($page->title, ENT_QUOTES))),
	 ));

 }
	
?>
</div>
<div class="clearfix"></div>
<?php 
	$arr1 = array("â€™", "Â");
	$arr2 = array("'","");
	
	if ($page->is_datacard == 0):
?>
<div class="col-md-12 pb-50 pt-40">
	<!-- Left column starts -->
	
		<div class="col-md-8 mt-20 main-left-content">
			<?php 
			echo !empty($page->content) ? htmlspecialchars_decode(str_replace($arr1, $arr2, $page->content), ENT_QUOTES) : 'We are still working to deliver an awesome output to you. Please wait few more minutes.'?>
		</div>
		
		<!-- Left column Ends -->
		
		
		<!-- right column starts -->
		
			<?php $this->renderPartial('site/_rightbar')?>
			
		<!-- right column Ends -->
	</div>
<?php else:?>

	<div class="col-md-12 pb-50 pt-20 datacard-content">
		<h1><?php echo strip_tags(htmlspecialchars_decode($page->title, ENT_QUOTES));?></h1>
		<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->getBaseUrl()?>/css/datacard-tables.css" />
		<?php echo !empty($page->content) ? htmlspecialchars_decode(str_replace($arr1, $arr2, $page->content), ENT_QUOTES) : 'We are still working to deliver an awesome output to you. Please wait few more minutes.'?>
	</div>
	
<?php endif;?>
</div>
	<div class="clearfix"></div>
<?php if ($page->is_datacard == 0):?>
<!-- About us section starts -->
	<div class="col-md-12 pb-50 pt-50 bg-gray">
		<div class="wrapper">
			<div class="col-md-2">
				<h3 class="headings">About Us</h3>
				<p class="text-gray"><strong>Corporate Background</strong></p>
			</div>
			<div class="col-md-10">
					<p>Since formation, Lake B2B has been at the forefront of data management services, list solutions, and customer data insights. We provide data centric solutions to a wide range of business-to-business companies. Our focus over the years has been on improving the efficiency of marketing campaigns, driving more revenue, and increasing profitability of sales and marketing teams in organizations.</p>
				
					<p><a href="<?php echo $this->createUrl('site/page', array('slug'=>'about-us'))?>" class="btn btn-danger mt-20">About Us</a></p>
				
			</div>
		</div>
	</div>

<!-- About us section Ends -->
	
	<div class="clearfix"></div>
	
<!-- 3 blocks sectino with image starts  -->
		<?php $this->renderPartial('site/_blocks');?>
<!-- 3 blocks sectino with image Ends -->

	<div class="clearfix"></div>
	
	<!--  Newsletter section starts -->
		<?php $this->renderPartial('site/_newsletter');?>
	<!--  Newsletter section ends -->
<?php endif; ?>	

<?php if ($page->is_datacard == 1):?>
		<div class="floating">
			<div class="float-data">
				<a href="mailto:info@lakeb2b.com"><i class="fa fa-envelope fa-2">&nbsp;<span>info@lakeb2b.com</span></i></a>
			</div>
		</div>
<?php endif;?>

<!--  Modal Code Starts -->

<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
        <h4 class="modal-title" id="myModalLabel">Fill out the form below and one of our representatives will get in touch with you.<br><small>and we promise to get back to you within the next 24 hours</small></h4>
      </div>
      <div class="modal-body col-md-12">
        <?php 
        $model = new Contacts();
        $form=$this->beginWidget('CActiveForm', array(
						'action' => $this->createUrl('site/contact'),
						'id'=>'user-form',
						'enableAjaxValidation'=>true,
						'clientOptions'=>array(
					      'validateOnSubmit'=>true,
					     ),
				
					)); 
		?>
			<?php $model->type = 2; echo $form->hiddenField($model,'type'); ?>
			
			<div class="form-group col-md-12 row">
				<?php echo $form->labelEx($model,'name', array('for'=>'contact_name')); ?>
				<?php echo $form->textField($model,'name', array('class'=>'form-control', 'placeholder'=>'Full Name*', 'id'=>'contact_name')); ?>
				<?php echo $form->error($model,'name'); ?>
			</div>
		
			<div class="form-group col-md-12 row">
				<?php echo $form->labelEx($model,'email', array('for'=>'contact_email')); ?>
				<?php echo $form->textField($model,'email', array('class'=>'form-control', 'placeholder'=>'Email Address*', 'id'=>'contact_email')); ?>
				<?php echo $form->error($model,'email'); ?>
			</div>
		
			<div class="form-group col-md-12 row">
				<?php echo $form->labelEx($model,'mobile', array('for'=>'contact_mobile')); ?>
				<?php echo $form->textField($model,'mobile', array('class'=>'form-control', 'placeholder'=>'Phone*', 'id'=>'contact_mobile')); ?>
				<?php echo $form->error($model,'mobile'); ?>
			</div>
		
			<div class="form-group col-md-12 row">
				<?php echo $form->labelEx($model,'message', array('for'=>'contact_message')); ?>
				<?php echo $form->textarea($model,'message', array('class'=>'form-control', 'placeholder'=>'Comments', 'id'=>'contact_message')); ?>
				<?php echo $form->error($model,'message'); ?>
			</div>
		
			<div class="form-group col-md-12 row">
				<div class="col-md-8 row">
				<?php echo CHtml::ajaxSubmitButton('Get a Quote NOW !', Yii::app()->getBaseUrl().'/site/contact/',
                 array(
                     'dataType'=>'json',
                     'type'=>'post',
                     'success'=>'function(data) {
                        if(data.status=="success"){
                        // $(".ajax-loader").text("Thank you for contacting us!").show();
                         $("#user-form")[0].reset();
                 		 window.location = "'.$this->createUrl('site/contact').'/thanks/";
                        }
                         else{
                        $.each(data, function(key, val) {
                        $("#user-form #"+key+"_em_").text(val);                                                    
                        $("#user-form #"+key+"_em_").show();
                 		$("#user-form #"+key+"_em_").closest(".form-group").addClass("has-error");
                        });
                 		$(".ajax-loader").empty();
                        }       
                    }',                    
                     'beforeSend'=>'function(){
						$(".form-group").removeClass("has-error");
                 		$(".errorMessage").text("");
                        $(".ajax-loader").html("<img src='.Yii::app()->getBaseUrl().'/images/loading.gif alt=loading... />").show();
                      }'
                     ),array('id'=>'datacard-btn','class'=>'btn btn-danger')); ?>
                     
                   </div>  
                    
                    <div class="ajax-loader col-md-4 row text-right pull-right"></div>
			</div>
		<div class="col-md-12 row form-group"><small><a href="<?php echo $this->createUrl('site/page', array('slug'=>'privacy-policy'))?>">Your privacy is important to us</a></small></div>
		<?php $this->endWidget(); ?>
      </div>
      <div class="modal-footer">
       
      </div>
    </div>
  </div>
</div>
<!--  Modal Code Ends -->
<style>
.datacard-content a.btn, .main-left-content a.btn{
	white-space: pre-wrap !important;
}				
</style>
<script>
$('a[href^=" http://www.lakeb2b.com/c-level-professionals-email"]').prop("href","http://www.lakeb2b.com/c-level-professionals-email-and-mailing-list/");

$('a[href="http://www.lakeb2b.com/healthcare-industry-email-and-mailing-list/"]').prop('href','http://www.lakeb2b.com/industries-healthcare/');

$('a[href=" http://www.lakeb2b.com/industries/"]').attr("href","http://www.lakeb2b.com/industries/");

$(document).ready(function(){
	$(document).find('table').addClass('table table-striped');
	$('.datacard-content a.btn-data').addClass('btn btn-danger');
	$('.datacard-content a.btn, .page-content a.btn').on('click', function(e){
		e.preventDefault();
		$('#myModal').modal();
		$text = new Array();

		$text[0] = 'Get a Quote NOW !';
		$text[1] = 'Get access to marketing database NOW!';
		$text[2] = 'Contact our data consultant NOW!';

		if ($(this).is($('.datacard-content a.btn').eq(0)) ){
			$('input#datacard-btn').val($text[0]);
		}
		if ($(this).is($('.datacard-content a.btn').eq(1)) ){
			$('input#datacard-btn').val($text[1]);
		}
		if ($(this).is($('.datacard-content a.btn').eq(2)) ){
			$('input#datacard-btn').val($text[2]);
		}
	});
	$('.banner').animate({backgroundColor: "<?php echo isset($bgColor) && !empty($bgColor) ? $bgColor : 'green'?>"}, 1000 );
	$('.banner img').animate({opacity :'1'}, 'slow');
	$('.banner .headings').animate({fontSize :'-=40px'},'slow');
});

</script>

<script src="<?php echo Yii::app()->getBaseUrl()?>/js/jquery.grid-a-licious.min.js" ></script>

<script>

$("#devices").gridalicious({
	width: 240,
	animate: true,
	gutter:10,
});
</script>
<style>

.white-panel{
	box-shadow:none;
	min-height:100px;
	padding:0px;
}

.banner .headings{
	font-size:72px;
}
.banner img{
	opacity:.1;
}
.datacard-content a.btn-data{
	margin-top:20px;
	float:right;
}
</style>